package cn.fulong.sso.client.utils;

import java.net.URLDecoder;
import java.net.URLEncoder;

/**
 * @Version 1.0
 * @Author: 云树
 * @Description:
 * @Date: 2019/2/27
 * @Modify 云树
 * @ModifyDate 2019/2/27
 * @since 1.0
 */
public class URLCoderUtil {

    public static String encode(String url) {
        try {
            return URLEncoder.encode(url, "UTF-8");
        } catch (Exception e) {
            return "";
        }
    }

    public static String decode(String url) {
        try {
            return URLDecoder.decode(url, "UTF-8");
        } catch (Exception e) {
            return "";
        }
    }
}
